<%@page import="java.sql.*"%>
<%@page import="jobportal.Dbconn" %>

<%@include file="header.jsp" %>
<% 
   Connection con=Dbconn.getConn();
   Statement st=con.createStatement();
   ResultSet rs=st.executeQuery("select * from jobs where compid='"+session.getAttribute("username")+"'");
%>



<table width="100%" border="0" cellpadding="0" cellspacing="0">
    <tr>
        <td align="left" valign="top">

            <span class='messagesred' style="text-align:center">
            </span>

            <table width="100%" border="0" cellspacing="0" >
                <tr>
                    <td width="100%" align="left" valign="top"><span class="mainheading_emp" style="margin-bottom:10px;">Manage Job Postings</span></td>
                </tr>
                <tr>
                    <td height="10" align="left" valign="top" class="normal"></td>
                </tr>
                <tr>
                    <td height="26" align="left" valign="top" class="normal"><table width="100%" border="0" cellspacing="2"  class="tbl_bdr">
                            <tr class="sde_mnu_hdr_blue" style="color:#000066;font-weight:bold" align="center">
                                <td width="29" height="37" valign="middle" class="subjeading" style="background-color: skyblue">#</td>
                              <td width="128" valign="middle" class="subjeading" style="background-color: skyblue">Job Title  </td>
                              <td width="117" valign="middle" class="subjeading" style="background-color: skyblue">Walk in Date </td>
                              <td width="122" valign="middle" class="subjeading" style="background-color: skyblue">Expiry Date  </td>
                              <td width="102" valign="middle" class="subjeading" style="background-color: skyblue">Status</td>
                              <td width="241" valign="middle" class="subjeading" style="background-color: skyblue">Action</td>
                      </tr>

          <% int i=0;
		  while(rs.next()){ 
		  i++;
		  %>
                            <tr class="greybg" style="font-weight:bold" align="center">
                                <td height="71" align="center" valign="middle"><%=i%></td>
                              <td  valign="middle" class="link"><a href="view_posted_jobs_emp.jsp?jobid=<%=rs.getString("jobid")%>" title="View Job Details"><%= rs.getString("jobtitle") %></a></td>
                                <td  valign="middle"><%= rs.getString("walkindate")%></td>
                                <td  valign="middle"><%=rs.getString("validuntil")%></td>
                                <td  valign="middle"><font color='green'><%= rs.getString("status") %></font>          </td>
                                <td  valign="middle">

                                    <a href="view_posted_jobs_emp.jsp?jobid=<%=rs.getString("jobid")%>" title="View Job Details"><input id="submit" name="submit" type="submit" value="View" class="button2" style="width:80px; height:40px;"></a>

                                   <%-- <a href="post_jobs_edit.jsp?jobid=<%=rs.getString("jobid") %>" title="Edit Job Details"><input id="submit1" name="submit1" type="submit" value="Edit" class="button2" style="width:50px; height:20px;"></a>--%>

                                <a href="DeleteJob?jobid=<%=rs.getString("jobid")%>" onclick="javascript: return confirm('Do you really want to delete this Job permanently?');"><input id="submit2" name="submit2" type="submit" value="Delete" class="button2" style="width:80px; height:40px;"></a></td>
                            </tr>
<%}%>

<tr align="center">
                <td width="29" height="30" align="center" valign="middle" class="subjeading" style="background-color: skyblue"></td>
                <td width="128"  valign="middle" class="subjeading" style="background-color: skyblue"></td>
                <td width="117"  valign="middle" class="subjeading" style="background-color: skyblue"></td>
                <td width="122"  valign="middle" class="subjeading" style="background-color: skyblue"></td>
                <td width="102"  valign="middle" class="subjeading" style="background-color: skyblue"></td>
                <td width="241"  valign="middle" class="subjeading" style="background-color: skyblue"></td>
				
                      </tr>

                        </table></td>
                </tr>
            </table></td>
    </tr>
</table>
<%@include file="footer.jsp" %>
<%
            if (request.getAttribute("status") != null) {
%>
<div id="message"  title="Message"><strong>
        <%
                        out.println(request.getAttribute("status"));
        %>
    </strong></div>
<%
                request.removeAttribute("status");
            }
%>